//
//  UIView+Screenhot.m
//  Sight
//
//  Created by chen on 16/6/10.
//  Copyright (c) 2016年 chen. All rights reserved.
//

#import "UIView+Screenhot.h"

@implementation UIView(UIView_Screenhot)
                 
-(UIImage *)convertViewToImage
{
    UIGraphicsBeginImageContext(self.bounds.size);
    [self drawViewHierarchyInRect:self.bounds afterScreenUpdates:YES];
    UIImage *image=UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return image;
}


@end
